package cn.javaxc.mvcwork.framework.database;





public class ConnectionElement implements Cloneable {

  private String url = "";
  private String dbName = "";
  private String username = "";
  private String password = "";
  private String driver = null;
  private java.util.Date activeDate = new java.util.Date();
  private boolean allowCloseOnIdle = true;


  
  public ConnectionElement() {
  }


  
  public ConnectionElement(String thisUrl, String thisUsername,
                           String thisPassword) {
    this.url = thisUrl;
    this.username = thisUsername;
    this.password = thisPassword;
  }


  
  public void setUrl(String tmp) {
    this.url = tmp;
  }


  
  public void setUsername(String tmp) {
    this.username = tmp;
  }


  
  public void setPassword(String tmp) {
    this.password = tmp;
  }


  
  public void setAllowCloseOnIdle(boolean tmp) {
    this.allowCloseOnIdle = tmp;
  }


  
  public void setDbName(String tmp) {
    this.dbName = tmp;
  }


  
  public void setDriver(String tmp) {
    this.driver = tmp;
  }


  
  public void setActiveDate(java.util.Date tmp) {
    this.activeDate = tmp;
  }


  
  public String getUrl() {
    return url;
  }


  
  public String getUsername() {
    return username;
  }


  
  public String getPassword() {
    return password;
  }


  
  public java.util.Date getActiveDate() {
    return activeDate;
  }


  
  public boolean getAllowCloseOnIdle() {
    return allowCloseOnIdle;
  }


  
  public String getDbName() {
    return dbName;
  }


  
  public String getDriver() {
    return driver;
  }


  
  public void renew() {
    activeDate = new java.util.Date();
  }


  
  public Object clone() {
    try {
      return super.clone();
    } catch (java.lang.CloneNotSupportedException e) {
    }
    return null;
  }
	public String toString(){
		return url;
	}
}
